[gdk] Remove deprecated GdkRGB stuff
authorJavier Jardón <jjardon@gnome.org>
Thu, 26 Nov 2009 04:48:52 +0000 (05:48 +0100)
committerJavier Jardón <jjardon@gnome.org>
Sun, 2 May 2010 23:51:20 +0000 (01:51 +0200)
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
docs/reference/gdk/gdk-sections.txt
docs/reference/gdk/tmpl/rgb.sgml
gdk/gdk.symbols
gdk/gdkrgb.c
gdk/gdkrgb.h

index 128ca4a7509d3cbf9452991f0cc65e21ed891867..a9891e0bf8f8b7ee76e44542c3db59015155f875 100644 (file)
@@ -215,14 +215,6 @@ GnomeCanvasPixbuf
     and use that to draw the image onto a drawable.
   </para>
 
-  <important>
-    <para>
-      Since these functions use GdkRGB for rendering, you must
-      initialize GdkRGB before using any of them.  You can do this by
-      calling gdk_rgb_init() near the beginning of your program.
-    </para>
-  </important>
-
 
 <!-- ##### SECTION ./tmpl/rendering.sgml:See_Also ##### -->
   <para>
index a4c99e63012657275b908fa7b12235597ecc3911..98d32ba639e1f907b1e28ab28ca15f263e963293 100644 (file)
@@ -305,7 +305,6 @@ gdk_image_get_type
 <SECTION>
 <TITLE>GdkRGB</TITLE>
 <FILE>rgb</FILE>
-gdk_rgb_init
 
 <SUBSECTION>
 gdk_draw_rgb_image
@@ -322,9 +321,6 @@ gdk_rgb_cmap_free
 GdkRgbCmap
 
 <SUBSECTION>
-gdk_rgb_gc_set_foreground
-gdk_rgb_gc_set_background
-gdk_rgb_xpixel_from_rgb
 gdk_rgb_find_color
 
 <SUBSECTION>
index 000f2ce0274bd9fa4af2ddd2ebdeef8d57f9c5c0..857558d71e78d0d1296edf367e993ddb33415bf1 100644 (file)
@@ -125,14 +125,6 @@ colors.</para></listitem>
 <!-- ##### SECTION Stability_Level ##### -->
 
 
-<!-- ##### FUNCTION gdk_rgb_init ##### -->
-<para>
-This function no longer does anything at all. It's completely useless
-(and harmless).
-</para>
-
-
-
 <!-- ##### FUNCTION gdk_draw_rgb_image ##### -->
 <para>
 Draws an RGB image in the drawable. This is the core GdkRGB
@@ -328,37 +320,6 @@ colors. This is used only for gdk_draw_indexed_image().
 @colors: The colors, represented as 0xRRGGBB integer values.
 @n_colors: The number of colors in the cmap.
 
-<!-- ##### FUNCTION gdk_rgb_gc_set_foreground ##### -->
-<para>
-Sets the foreground color in @gc to the specified color (or the
-closest approximation, in the case of limited visuals).
-</para>
-
-@gc: The #GdkGC to modify.
-@rgb: The color, represented as a 0xRRGGBB integer value.
-
-
-<!-- ##### FUNCTION gdk_rgb_gc_set_background ##### -->
-<para>
-Sets the background color in @gc to the specified color (or the
-closest approximation, in the case of limited visuals).
-</para>
-
-@gc: The #GdkGC to modify.
-@rgb: The color, represented as a 0xRRGGBB integer value.
-
-
-<!-- ##### FUNCTION gdk_rgb_xpixel_from_rgb ##### -->
-<para>
-Finds the X pixel closest in color to the @rgb color specified. This
-value may be used to set the <structfield>pixel</structfield> field of
-a #GdkColor struct.
-</para>
-
-@rgb: The color, represented as a 0xRRGGBB integer value.
-@Returns: The X pixel value.
-
-
 <!-- ##### FUNCTION gdk_rgb_find_color ##### -->
 <para>
 
index fe3e0a671bbc3437df4a31ff1629b3b639d00b22..b95fe78b318c84a0ec1511e2ec3a89c3f3123a47 100644 (file)
@@ -984,12 +984,6 @@ gdk_rgb_ditherable
 gdk_rgb_find_color
 gdk_rgb_get_colormap
 gdk_rgb_get_visual
-#ifndef GDK_DISABLE_DEPRECATED
-gdk_rgb_init
-gdk_rgb_xpixel_from_rgb G_GNUC_CONST
-gdk_rgb_gc_set_background
-gdk_rgb_gc_set_foreground
-#endif
 gdk_rgb_set_install
 gdk_rgb_set_min_colors
 gdk_rgb_set_verbose
index 7885c920ab9fcf8b279926f341b36b7a54b4f185..4c7c858b2030a83a0c4840178dc72f66d900dcec 100644 (file)
@@ -672,21 +672,6 @@ gdk_rgb_create_info (GdkVisual *visual, GdkColormap *colormap)
   return image_info;
 }
 
-void
-gdk_rgb_init (void)
-{
-  static const gint byte_order[1] = { 1 };
-
-  /* check endian sanity */
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-  if (((char *)byte_order)[0] == 1)
-    g_error ("gdk_rgb_init: compiled for big endian, but this is a little endian machine.\n\n");
-#else
-  if (((char *)byte_order)[0] != 1)
-    g_error ("gdk_rgb_init: compiled for little endian, but this is a big endian machine.\n\n");
-#endif
-}
-
 static GdkRgbInfo *
 gdk_rgb_get_info_from_colormap (GdkColormap *cmap)
 {
@@ -779,36 +764,6 @@ gdk_rgb_xpixel_from_rgb_internal (GdkColormap *colormap,
   return pixel;
 }
 
-/* convert an rgb value into an X pixel code */
-gulong
-gdk_rgb_xpixel_from_rgb (guint32 rgb)
-{
-  guint32 r = rgb & 0xff0000;
-  guint32 g = rgb & 0xff00;
-  guint32 b = rgb & 0xff;
-
-  return gdk_rgb_xpixel_from_rgb_internal (gdk_screen_get_rgb_colormap (gdk_screen_get_default ()),
-                                          (r >> 8) + (r >> 16), g + (g >> 8), b + (b << 8));
-}
-
-void
-gdk_rgb_gc_set_foreground (GdkGC *gc, guint32 rgb)
-{
-  GdkColor color;
-
-  color.pixel = gdk_rgb_xpixel_from_rgb (rgb);
-  gdk_gc_set_foreground (gc, &color);
-}
-
-void
-gdk_rgb_gc_set_background (GdkGC *gc, guint32 rgb)
-{
-  GdkColor color;
-
-  color.pixel = gdk_rgb_xpixel_from_rgb (rgb);
-  gdk_gc_set_background (gc, &color);
-}
-
 /**
  * gdk_rgb_find_color:
  * @colormap: a #GdkColormap
index 3136e9afeb4312a7ec313fc1f033cf05e29b7124..919ac35fe63f45224625800fad688545dc346a40 100644 (file)
@@ -45,17 +45,6 @@ struct _GdkRgbCmap {
   GSList *info_list;
 };
 
-#ifndef GDK_DISABLE_DEPRECATED
-void gdk_rgb_init (void);
-
-gulong gdk_rgb_xpixel_from_rgb   (guint32      rgb) G_GNUC_CONST;
-void   gdk_rgb_gc_set_foreground (GdkGC       *gc,
-                                 guint32      rgb);
-void   gdk_rgb_gc_set_background (GdkGC       *gc,
-                                 guint32      rgb);
-#define gdk_rgb_get_cmap               gdk_rgb_get_colormap
-#endif /* GDK_DISABLE_DEPRECATED */
-
 void   gdk_rgb_find_color        (GdkColormap *colormap,
                                  GdkColor    *color);